package com.ycc.springcloud.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ycc.springcloud.pojo.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DeptDao extends BaseMapper<Dept> {

    @Select("select * from dept")
    public List<Dept> queryAll();


    @Select("select * from dept where deptno = #{id}")
    public Dept queryById(@Param("id")Long id);


}
